package com.example.wanandroid_copy2.ui.system.view

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentStatePagerAdapter


class SystemArticleAdapter(manager : FragmentManager, private val titles : List<String>?, private val fragments : List<Fragment>) : FragmentStatePagerAdapter(manager) {

    override fun getPageTitle(position: Int): CharSequence? = titles?.get(position)

    override fun getItem(position: Int): Fragment = fragments[position]

    override fun getCount(): Int = fragments.size
}